import './assets/main.css'

import { createApp } from 'vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
// import 'element-plus/theme-chalk/dark/css-vars.css'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
//引入仓库
import pinia from "@/stores/index.js";

import App from './App.vue'
import router from './router'
//引入按钮权限控制自定义指令
import { installPermi } from "@/directive/btnPermission";
//引入图片懒加载
import { installimgLazy } from "@/directive/imgLazy";
//引入拖拽指令
import { installimgMov } from "@/directive/mov";
//引入arcgis相关
//arcgis秘钥：AAPKbc1b5d6c3989428e80088fa0d6f69de5Qq0og2C5pkwPYukMold_oELf9AivWxjjHSuV8tjhuTGRABp_7hBlMONMRyqJdSLe
import "@arcgis/core/assets/esri/themes/light/main.css";
import esriConfig from "@arcgis/core/config.js";

esriConfig.portalUrl = "https://ws8575.club/web";
esriConfig.apiKey = "AAPKbc1b5d6c3989428e80088fa0d6f69de5Qq0og2C5pkwPYukMold_oELf9AivWxjjHSuV8tjhuTGRABp_7hBlMONMRyqJdSLe";

const app = createApp(App)
app.use(pinia)
app.use(ElementPlus)
app.use(router)

installPermi(app);
installimgLazy(app);
installimgMov(app);

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}

//引入路由鉴权
import "./permission.js";

app.mount('#app')
